html,
body,
#app {
    height: 100%;
}

// table 滚动状态下的样式, small table
.ant-table {
    &.ant-table-ping-right:not(.ant-table-has-fix-right) .ant-table-container::after,
    &.ant-table-ping-left:not(.ant-table-has-fix-left) .ant-table-container:before {
        box-shadow: none;
    }
    .ant-table-small,
    &.ant-table-middle {
        font-size: 12px;
    }
    .ant-table-small {
        .ant-table-thead > tr > th:first-child,
        .ant-table-tbody > tr > td:first-child {
            padding-left: 20px;
        }
        .ant-table-thead > tr > th:last-child,
        .ant-table-tbody > tr > td:last-child {
            padding-right: 20px;
        }
    }
    // 复制
    .ant-typography {
        margin-bottom: 0 !important;
    }
    // 筛选
    .ant-table-thead > tr > th {
        .ant-table-filter-column {
            display: block;
            margin: 0;
            .ant-table-filter-column-title {
                padding: 16px 0;
            }
            .ant-table-filter-trigger-container {
                display: inline;
                right: unset;
                .ant-table-filter-icon,
                .anticon-filter {
                    top: 45%;
                    left: 50%;
                }
            }
        }
    }
}

// 可展开表格的bug
.dt-table-fixed-base {
    .ant-table {
        .ant-table-expanded-row {
            .ant-table-wrapper .ant-spin-nested-loading .ant-spin-container .ant-table-content .ant-table-placeholder {
                position: relative;
                top: unset;
            }
        }
    }
    .ant-spin-container > .ant-table-pagination {
        line-height: 67px;
        height: 67px;
        background-color: #fff;
        &.ant-pagination.mini {
            align-items: center;
        }
    }
}

// 固定表格高度(自带分页）
.dt-table-fixed-base {
    &.ant-table-wrapper,
    .ant-table-wrapper {
        height: 100%;
        background: #fff;
        padding: 0 !important;
        box-shadow: 0px 2px 8px 0px rgba(6, 14, 26, 0.08);
        .ant-spin-nested-loading {
            height: 100%;
            .ant-spin-container {
                height: 100%;
                .ant-table-fixed-header {
                    // 存在数据的时候 有分页组件存在 高度需要减去分页的高度
                    &:not(:last-child) {
                        height: calc(100% - 67px) !important;
                    }
                    height: 100%; // 分页高度为 67px
                    .ant-table-content {
                        height: 100%;
                        .ant-table-scroll {
                            height: 100%;
                            .ant-table-body {
                                height: calc(100% - 44px); // 表格 header 高度为 44px
                            }
                        }
                        .ant-table-fixed-right,
                        .ant-table-fixed-left {
                            height: 100%;
                            z-index: 10;
                            .ant-table-body-outer {
                                height: calc(100% - 44px);
                                .ant-table-body-inner {
                                    height: 100%;
                                }
                            }
                        }
                        .ant-table-placeholder {
                            position: absolute;
                            top: 45px;
                            width: 100%;
                            color: #bfbfbf;
                            text-align: center;
                            border: none;
                        }
                    }
                }
            }
        }
    }
}

// input
.ant-input,
.ant-select-selection {
    border-radius: 2px;
}
// input-search
.ant-input-search {
    & > .ant-input-group > .ant-input-group-addon:last-child {
        .ant-input-search-button.ant-btn-icon-only {
            padding: 0;
            border: 0;
            border-radius: 0 2px 2px 0;
        }
    }
    &.dt-form-shadow-bg {
        .ant-input-wrapper {
            box-shadow: 0px 2px 8px 0px rgba(6, 14, 26, 0.08);
        }
        .ant-input,
        .ant-btn-icon-only {
            box-shadow: none;
        }
    }
}

// dt-form-shadow-bg
.dt-form-shadow-bg {
    &.ant-select {
        .ant-select-selector {
            border-color: transparent;
            box-shadow: 0px 2px 8px 0px rgba(6, 14, 26, 0.08);
            &:hover {
                border-color: #3f87ff;
            }
        }
        &.ant-select-focused:not(.ant-select-disabled).ant-select:not(.ant-select-customize-input)
            .ant-select-selector {
            box-shadow: none;
            outline: 0;
        }
    }
}

// select - 选择框
.ant-select-dropdown {
    .ant-select-item {
        font-size: 12px;
        &.ant-select-item-option-active:not(.ant-select-item-option-disabled) {
            background-color: #f0f8ff;
        }
    }
}

// form - 表单
.ant-form {
    .ant-form-item-label > label.ant-form-item-required:not(.ant-form-item-required-mark-optional)::before,
    .ant-form-item-explain,
    .ant-form-item-extra,
    .has-error.has-feedback .ant-form-item-children-icon,
    .has-success.has-feedback .ant-form-item-children-icon,
    .has-warning.has-feedback .ant-form-item-children-icon,
    .is-validating.has-feedback .ant-form-item-children-icon {
        font-size: 12px;
    }
    .ant-form-item-explain,
    .ant-form-item-extra {
        line-height: 18px;
    }
}

// ant-btn - 按钮
.ant-btn {
    &.ant-btn-dangerous.ant-btn-primary:hover,
    &.ant-btn-dangerous.ant-btn-primary:focus {
        color: #fff;
        background: #ff7875;
        border-color: #ff7875;
    }
}

// ant-menu - 菜单
.dt-layout-header .ant-menu-horizontal > .ant-menu-item {
    top: 0;
}
.ant-menu-dark.ant-menu-horizontal > .ant-menu-item:hover {
    background-color: transparent;
}
